home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
010
/
hrace.bas
< prev
next >
Wrap
BASIC Source File
|
1988-11-09
|
7KB
|
240 lines
5 S1=25:S2=25:S3=25:S4=25:S5=25:S6=25:S7=25:S8=25:S9=25:S10=25
10 REM ** DELUXE HORSE RACING **
20 REM ** BY CHRIS HUDSON AND JON RITZ **
25 RANDOMIZE VAL(MID$(TIME$,7,2))
30 SCREEN 2
35 KEY OFF
40 CLS
45 LINE (11,2)-(14,2)
300 PRINT "Welcome to The Meadows horse racing tracks! The races are about to begin so get your bets in!"
305 PRINT
308 PRINT
310 INPUT "How much money are you taking to the track this evening";ADOW
311 IF X=1 THEN 315
315 PRINT
320 PRINT "Here are the horses and the odds:"
325 PRINT
330 PRINT "1. Lightnin' 3 to 1"
340 PRINT "2. Joey 3 to 1"
350 PRINT "3. Benny's Girl 5 to 1"
360 PRINT "4. Maiden 12 to 1"
370 PRINT "5. Lady Anne 17 to 1"
380 PRINT "6. Stranger Eyes 25 to 1"
390 PRINT "7. Spooky 48 to 1"
400 PRINT "8. Runaway 56 to 1"
410 PRINT "9. Painter's Cap 65 to 1"
420 PRINT "10. Tom Sawyer 72 to 1"
430 PRINT
440 PRINT:INPUT "Which horse would you like to bet on";AHORSE
445 IF X=1 THEN 455
455 PRINT
460 INPUT "How much would you like to bet";ABET
465 IF ABET>ADOW THEN 470 ELSE 480
470 PRINT "You don't have that much!"
475 PRINT:GOTO 460
480 IF X=1 THEN 510
495 IF BBET>BDOW THEN 500 ELSE 510
500 PRINT "You don't have that much!"
505 PRINT:GOTO 490
510 CLS
520 IF SEE=0 THEN 521 ELSE 705
521 DIM AHORSE(500)
522 SEE=SEE+1
525 LINE (14,1)-(15,1)
530 LINE (13,2)-(16,2)
535 LINE (12,3)-(17,3)
540 LINE (5,4)-(14,4)
545 LINE (2,5)-(14,5)
550 LINE (1,6)-(2,6)
555 LINE (5,6)-(13,6)
560 LINE (6,7)-(7,7)
565 LINE (11,7)-(12,7)
570 LINE (7,8)-(8,8)
575 LINE (10,8)-(11,8)
580 PSET (8,9)
585 PSET (10,9)
610 GET (1,1)-(17,9),AHORSE
620 CLS
630 IF BSEE=1 THEN 640 ELSE 631
631 DIM BHORSE(500)
632 BSEE=1
640 LINE (12,1)-(13,1)
645 LINE (11,2)-(14,2)
650 LINE (10,3)-(15,3)
655 LINE (5,4)-(12,4)
656 LINE (2,5)-(12,5)
657 PSET (2,5)
658 LINE (1,6)-(2,6)
660 LINE (5,6)-(11,6)
665 PSET (5,7)
670 LINE (11,7)-(12,7)
675 LINE (4,8)-(5,8)
680 LINE (12,8)-(13,8)
685 LINE (3,9)-(4,9)
690 PSET (13,9)
700 GET (1,1)-(17,9),BHORSE
705 S1=25:S2=25:S3=25:S4=25:S5=25:S6=25:S7=25:S8=25:S9=25:S10=25
706 CLS
707 LINE (500,5)-(500,180)
708 LOCATE 23,56:PRINT "FINISH LINE"
710 LOCATE 2,1:PRINT "1."
720 LOCATE 4,1:PRINT "2."
730 LOCATE 6,1:PRINT "3."
740 LOCATE 8,1:PRINT "4."
750 LOCATE 10,1:PRINT "5."
760 LOCATE 12,1:PRINT "6."
770 LOCATE 14,1:PRINT "7."
780 LOCATE 16,1:PRINT "8."
790 LOCATE 18,1:PRINT "9."
800 LOCATE 20,1:PRINT "10."
810 PUT (25,6),BHORSE
820 PUT (25,22),BHORSE
830 PUT (25,38),BHORSE
840 PUT (25,54),BHORSE
850 PUT (25,70),BHORSE
860 PUT (25,86),BHORSE
870 PUT (25,102),BHORSE
880 PUT (25,118),BHORSE
890 PUT (25,134),BHORSE
900 PUT (25,150),BHORSE
901 LOCATE 22,1:PRINT "You are horse #"AHORSE"."
902 LOCATE 23,1:PRINT "Press any key to start the race...."
903 JON$=INKEY$:IF JON$="" THEN 903
904 LOCATE 22,1:PRINT " "
905 LOCATE 23,1:PRINT " "
910 REM ** AHORSE 1 **
920 PUT (S1,6),BHORSE
930 S1=S1+INT(RND*12+1)
940 PUT (S1,6),AHORSE
970 REM ** AHORSE 2
980 PUT (S2,22),BHORSE
990 S2=S2+INT(RND*12+1)
1000 PUT (S2,22),AHORSE
1010 REM ** AHORSE 3 **
1020 PUT (S3,38),BHORSE
1030 S3=S3+INT(RND*12+1)
1040 PUT (S3,38),AHORSE
1045 REM ** AHORSE 4 **
1050 PUT (S4,54),BHORSE
1060 S4=S4+INT(RND*12+1)
1070 PUT (S4,54),AHORSE
1080 REM ** AHORSE 5 **
1090 PUT (S5,70),BHORSE
1100 S5=S5+INT(RND*12+1)
1110 PUT (S5,70),AHORSE
1120 REM ** AHORSE 6 **
1130 PUT (S6,86),BHORSE
1140 S6=S6+INT(RND*11+1)
1150 PUT (S6,86),AHORSE
1160 REM ** AHORSE 7 **
1170 PUT (S7,102),BHORSE
1180 S7=S7+INT(RND*11+1)
1190 PUT (S7,102),AHORSE
1200 REM ** AHORSE 8 **
1210 PUT (S8,118),BHORSE
1220 S8=S8+INT(RND*11+1)
1230 PUT (S8,118),AHORSE
1235 REM AHORSE 9
1250 PUT (S9,134),BHORSE
1260 S9=S9+INT(RND*11+1)
1270 PUT (S9,134),AHORSE
1280 REM ** AHORSE 10 **
1290 PUT (S10,150),BHORSE
1300 S10=S10+INT(RND*11+1)
1310 PUT (S10,150),AHORSE
1320 IF S1>500 THEN 1325 ELSE 1330
1325 WINNER$="Lightnin', #1":GOTO 2000
1330 IF S2>500 THEN 1335 ELSE 1340
1335 WINNER$="Joey, #2":GOTO 2000
1340 IF S3>500 THEN 1345 ELSE 1350
1345 WINNER$="Benny's Girl, #3":GOTO 2000
1350 IF S4>500 THEN 1355 ELSE 1360
1355 WINNER$="Maiden, #4":GOTO 2000
1360 IF S5>500 THEN 1365 ELSE 1370
1365 WINNER$="Lady Anne, #5":GOTO 2000
1370 IF S6>500 THEN 1375 ELSE 1380
1375 WINNER$="Stranger Eyes, #6":GOTO 2000
1380 IF S7>500 THEN 1385 ELSE 1390
1385 WINNER$="Spooky, #7":GOTO 2000
1390 IF S8>500 THEN 1395 ELSE 1400
1395 WINNER$="Runaway, #8":GOTO 2000
1400 IF S9>500 THEN 1405 ELSE 1410 FINISH LINE
1405 WINNER$="Painter's Cap, #9":GOTO 2000
1410 IF S10>500 THEN 1415 ELSE 1500 FINISH LINE
1415 WINNER$="Tom Sawyer, #10":GOTO 2000
1500 REM ** BHORSE 1 **
1510 PUT (S1,6),AHORSE
1520 S1=S1+INT(RND*5+5)
1530 PUT (S1,6),BHORSE
1540 REM ** BHORSE 2 **
1550 PUT (S2,22),AHORSE
1560 S2=S2+INT(RND*5+5)
1570 PUT (S2,22),BHORSE
1580 REM ** BHORSE 3 **
1590 PUT (S3,38),AHORSE
1600 S3=S3+INT(RND*5+5)
1610 PUT (S3,38),BHORSE
1620 REM ** BHORSE 4 **
1630 PUT (S4,54),AHORSE
1640 S4=S4+INT(RND*5+5)
1650 PUT (S4,54),BHORSE
1660 REM ** BHORSE 5 **
1670 PUT (S5,70),AHORSE
1680 S5=S5+INT(RND*5+1)
1690 PUT (S5,70),BHORSE
1700 REM ** BHORSE 6 **
1710 PUT (S6,86),AHORSE
1720 S6=S6+INT(RND*5+1)
1730 PUT (S6,86),BHORSE
1740 REM ** BHORSE 7 **
1750 PUT (S7,102),AHORSE
1760 S7=S7+INT(RND*5+1)
1770 PUT (S7,102),BHORSE
1780 REM ** BHORSE 8 **
1790 PUT (S8,118),AHORSE
1800 S8=S8+INT(RND*5+1)
1810 PUT (S8,118),BHORSE
1820 REM ** BHORSE 9 **
1830 PUT (S9,134),AHORSE
1840 S9=S9+INT(RND*5+5)
1850 PUT (S9,134),BHORSE
1860 REM ** BHORSE 10 **
1870 PUT (S10,150),AHORSE
1880 S10=S10+INT(RND*5+5)
1890 PUT (S10,150),BHORSE
1900 GOTO 910
2000 LOCATE 20,1:PRINT "....And the winner is "WINNER$". "
2010 IF WINNER$="Lightnin', #1" THEN WH=1
2015 IF WINNER$="Joey, #2" THEN WH=2
2020 IF WINNER$="Benny's Girl, #3" THEN WH=3
2025 IF WINNER$="Maiden, #4" THEN WH=4
2030 IF WINNER$="Lady Anne, #5" THEN WH=5
2035 IF WINNER$="Stranger Eyes, #6" THEN WH=6
2040 IF WINNER$="Spooky, #7" THEN WH=7
2045 IF WINNER$="Runaway, #8" THEN WH=8
2050 IF WINNER$="Painter's Cap, #9" THEN WH=9
2055 IF WINNER$="Tom Sawyer, #10" THEN WH=10
2060 IF AHORSE=WH THEN 2500
2065 LOCATE 22,1:PRINT "Sorry, you lose."
2066 ADOW=ADOW-ABET
2070 LOCATE 23,1:PRINT "You lose"ABET"dollars. You now have"ADOW"dollars."
2075 LOCATE 24,1:PRINT "Press any key to continue...."
2080 JON$=INKEY$:IF JON$="" THEN 2080
2085 CLS:GOTO 320
2500 IF WH=1 THEN ABET=ABET*3
2505 IF WH=2 THEN ABET=ABET*3
2510 IF WH=3 THEN ABET=ABET*5
2515 IF WH=4 THEN ABET=ABET*12
2520 IF WH=5 THEN ABET=ABET*17
2525 IF WH=6 THEN ABET=ABET*25
2530 IF WH=7 THEN ABET=ABET*48
2535 IF WH=8 THEN ABET=ABET*56
2540 IF WH=9 THEN ABET=ABET*65
2545 IF WH=10 THEN ABET=ABET*72
2546 ADOW=ADOW+ABET
2550 LOCATE 22,1:PRINT "YOU WIN!!!"
2555 LOCATE 23,1:PRINT "YOU WIN"ABET"DOLLARS!!"
2650 LOCATE 24,1:PRINT "Press any key to continue..."
2655 JON$=INKEY$:IF JON$="" THEN 2655
2660 CLS:GOTO 320